package com.burstly.lib.conveniencelayer;

import android.app.Activity;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import com.burstly.lib.ui.BurstlyView;

public class BurstlyBanner extends BurstlyBaseAd
{
  @Deprecated
  public BurstlyBanner(Activity paramActivity, int paramInt)
  {
    super(paramActivity, BurstlyAdSize.UNKNOWN);
    setBurstlyView((BurstlyView)paramActivity.findViewById(paramInt));
  }

  @Deprecated
  public BurstlyBanner(Activity paramActivity, ViewGroup paramViewGroup, ViewGroup.LayoutParams paramLayoutParams, String paramString1, String paramString2, int paramInt)
  {
    super(paramActivity, BurstlyAdSize.UNKNOWN);
    initBurstlyBanner(paramActivity, paramViewGroup, paramLayoutParams, paramString1, paramString2, paramInt);
  }

  public BurstlyBanner(Activity paramActivity, BurstlyAdSize paramBurstlyAdSize, int paramInt)
  {
    super(paramActivity, paramBurstlyAdSize);
    setBurstlyView((BurstlyView)paramActivity.findViewById(paramInt));
  }

  public BurstlyBanner(Activity paramActivity, BurstlyAdSize paramBurstlyAdSize, ViewGroup paramViewGroup, ViewGroup.LayoutParams paramLayoutParams, String paramString1, String paramString2, int paramInt)
  {
    super(paramActivity, paramBurstlyAdSize);
    initBurstlyBanner(paramActivity, paramViewGroup, paramLayoutParams, paramString1, paramString2, paramInt);
  }

  @Deprecated
  public BurstlyBanner(Fragment paramFragment, int paramInt)
  {
    super(paramFragment, BurstlyAdSize.UNKNOWN);
    View localView = paramFragment.getView();
    if (localView == null)
      throw new RuntimeException("fragment.getView returned null. Has this fragment inflated a layout?");
    BurstlyView localBurstlyView = (BurstlyView)localView.findViewById(paramInt);
    if (localBurstlyView == null)
      throw new RuntimeException("Invalid view Id.  A view with this Id could not be found in the current layout");
    setBurstlyView(localBurstlyView);
  }

  @Deprecated
  public BurstlyBanner(Fragment paramFragment, ViewGroup paramViewGroup, ViewGroup.LayoutParams paramLayoutParams, String paramString1, String paramString2, int paramInt)
  {
    super(paramFragment, BurstlyAdSize.UNKNOWN);
    initBurstlyBanner(paramFragment.getActivity(), paramViewGroup, paramLayoutParams, paramString1, paramString2, paramInt);
  }

  public BurstlyBanner(Fragment paramFragment, BurstlyAdSize paramBurstlyAdSize, int paramInt)
  {
    super(paramFragment, paramBurstlyAdSize);
    View localView = paramFragment.getView();
    if (localView == null)
      throw new RuntimeException("fragment.getView returned null. Has this fragment inflated a layout?");
    BurstlyView localBurstlyView = (BurstlyView)localView.findViewById(paramInt);
    if (localBurstlyView == null)
      throw new RuntimeException("Invalid view Id.  A view with this Id could not be found in the current layout");
    setBurstlyView(localBurstlyView);
  }

  public BurstlyBanner(Fragment paramFragment, BurstlyAdSize paramBurstlyAdSize, ViewGroup paramViewGroup, ViewGroup.LayoutParams paramLayoutParams, String paramString1, String paramString2, int paramInt)
  {
    super(paramFragment, paramBurstlyAdSize);
    initBurstlyBanner(paramFragment.getActivity(), paramViewGroup, paramLayoutParams, paramString1, paramString2, paramInt);
  }

  void initBurstlyBanner(Activity paramActivity, ViewGroup paramViewGroup, ViewGroup.LayoutParams paramLayoutParams, String paramString1, String paramString2, int paramInt)
  {
    BurstlyView localBurstlyView = new BurstlyView(paramActivity);
    localBurstlyView.setPublisherId(Burstly.getAppID());
    localBurstlyView.setZoneId(paramString1);
    localBurstlyView.setBurstlyViewId(paramString2);
    localBurstlyView.setDefaultSessionLife(paramInt);
    setBurstlyView(localBurstlyView);
    if (paramLayoutParams != null)
    {
      paramViewGroup.addView(localBurstlyView, paramLayoutParams);
      return;
    }
    paramViewGroup.addView(localBurstlyView);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.conveniencelayer.BurstlyBanner
 * JD-Core Version:    0.6.2
 */